#ifndef MPHTTPRESPONSESTREAMCONTENT_H
#define MPHTTPRESPONSESTREAMCONTENT_H

/*****************************************
 * HttpResponseStreamContent 继承于 HttpResponseContent
 *****************************************/

#include <sstream>

#include "mpHttpResponseMessage.h"

namespace MP{
namespace HTTP{
namespace INTERNAL{


class HttpResponseStreamContent : public HttpResponseContent
{
public:
    HttpResponseStreamContent(std::stringstream& stream);
    ~HttpResponseStreamContent() override = default;

    virtual void beginReadData() override;
    virtual void onReadDataSome(const char* data, std::size_t length) override;
    virtual void endReadData() override;

private:
    std::stringstream& _stream;

};

}   //INTERNAL
}   //HTTP
}   //MP


#endif // MPHTTPRESPONSESTREAMCONTENT_H
